# $Id: PKGBUILD 280288 2016-11-10 18:13:29Z arojas $
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=libkcompactdisc4
pkgver=16.08.3
pkgrel=1
pkgdesc="A library for interfacing with CDs"
url='https://www.kde.org/applications/multimedia/'
arch=(i686 x86_64)
license=(GPL LGPL FDL)
depends=(kdelibs)
makedepends=(cmake automoc4)
replaces=('libkcompactdisc<16.11')
conflicts=('libkcompactdisc<16.11')
source=("http://download.kde.org/stable/applications/$pkgver/src/libkcompactdisc-$pkgver.tar.xz")
sha1sums=('d0441f1cf2f74dad4d3aa80fd4d8171ec740713e')

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../libkcompactdisc-$pkgver \
    -DCMAKE_BUILD_TYPE=Release \
    -DKDE4_BUILD_TESTS=OFF \
    -DCMAKE_INSTALL_PREFIX=/usr
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
}
